import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import * as path from "node:path";

// https://vitejs.dev/config/
export default defineConfig({
  server:{
    proxy:{
      '/api':{
        target:'http://localhost:4112',
        changeOrigin:true,
        rewrite:path=>path.replace(/^\/api/,'')
      }
    },
    port:80,
    host:'0.0.0.0'
  },
  resolve:{
    alias:{
      '@': path.resolve(__dirname, './src'),
    }
  },
  plugins: [vue()],
})
